package com.longcai.mapper.nearbyshop;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.longcai.entity.nearby.ClyjNearbyShopsGoodsSpec;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author kh
 * @since 2019-04-25
 */
public interface ClyjNearbyShopsGoodsSpecMapper extends BaseMapper<ClyjNearbyShopsGoodsSpec> {
   
    /**
	 * 库存低于库存警告数量
	 * **/
    @Select("select count(*)  from clyj_nearby_shops_goods_spec  c  where c.spec_stock < c.spce_stock_warn and c.spec_stock>0;")
    int queryStockCount();
    /**
	 * 仓库中的数量
	 * **/
    @Select("select count(*)from clyj_nearby_shops_goods_spec  c where c.spec_stock = 0;")
    int queryStockSpecCount();
    
    
    
	/**
	 * 库存低于库存警告的列表
	 * **/
    @Select("select * from clyj_nearby_shops_goods_spec  c  where c.spec_stock < c.spce_stock_warn")
    List<ClyjNearbyShopsGoodsSpec> compareStock();
    /**
	 * 仓库中类表
	 * **/
    @Select("select * from clyj_nearby_shops_goods_spec  c  where c.spec_stock = 0 ")
    List<ClyjNearbyShopsGoodsSpec> queryStock();
	/**批量删除商品规格**/
    int deleteNearbyShopsGoods(List<Map<String, String>>  list);
    
    
    
    
}
